package com.itheima.kafka.pojos;

import java.io.Serializable;

/**
 * 温度数据实体
 */
public class Temperature implements Serializable {
    
    private String sensorId;      // 传感器ID
    private Double temperature;   // 温度值
    private Long timestamp;       // 时间戳
    
    public Temperature() {
    }
    
    public Temperature(String sensorId, Double temperature, Long timestamp) {
        this.sensorId = sensorId;
        this.temperature = temperature;
        this.timestamp = timestamp;
    }
    
    public String getSensorId() {
        return sensorId;
    }
    
    public void setSensorId(String sensorId) {
        this.sensorId = sensorId;
    }
    
    public Double getTemperature() {
        return temperature;
    }
    
    public void setTemperature(Double temperature) {
        this.temperature = temperature;
    }
    
    public Long getTimestamp() {
        return timestamp;
    }
    
    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }
    
    @Override
    public String toString() {
        return "Temperature{" +
                "sensorId='" + sensorId + '\'' +
                ", temperature=" + temperature +
                "°C, timestamp=" + timestamp +
                '}';
    }
}

